package util

import (
	"io/fs"
	"os"
)

func DirEntry(path string) (names []string, err error) {

	var (
		dir_entries = []fs.DirEntry{}
	)

	names = []string{}

	if dir_entries, err = os.ReadDir(path); err != nil {
		return
	}

	for _, entry := range dir_entries {

		names = append(names, entry.Name())
	}

	return
}
